#!/bin/bash

set -e

case "$1" in
	purge)
		[ -d /var/lib/nxlog ] && rm -rf /var/lib/nxlog
		[ -d /var/log/nxlog ] && rm -rf /var/log/nxlog
		[ -d /var/spool/nxlog ] && rm -rf /var/spool/nxlog
		[ -d /run/nxlog ] && rm -rf /run/nxlog
		[ -f /etc/nxlog/nxlog.conf ] && rm -rf /etc/nxlog/nxlog.conf

#		if NUSER_ENTRY=`getent passwd nxlog`; then
#			deluser --quiet $NXLOGUSER
#		fi

		;;

	remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)

		;;

	*)

		echo "postrm called with unknown argument \`$1'" >&2
		exit 1

		;;

esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0

